# Author: Mikael Lundin
# Date: 2010-06-24
# Description: Shows how to modify input on a page and post the form

# Import .NET Common Language Runtime
import clr

# Import Hippo Framework
clr.AddReference("Hippo.Framework")
import Hippo.Framework
import Hippo.Framework.Web

class FormInputManipulation(Hippo.Framework.TestBase): 
	def Run(self):
		browser = BrowserEmulator()
		page = browser.Open[GoogleSearchPage]("http://www.litemedia.se")
		page.searchInput().SetValue("Hippo");
		page.submitButton().Click();
		
class GoogleSearchPage(Hippo.Framework.Web.Page)
	def searchInput(self):
		return Document.FindById("q")
	
	def submitButton(self):
		return Document.FindByName("btnG")